<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .fu{
            background-color: #bbf369;
             display: flex;/*表示该父元素是弹性布局 默认水平排序*/
            flex-direction: row;/*表示子元素是水平布局*/
            flex-direction: column;/*表示子元素是垂直布局*/
            flex-direction: row-reverse;/*表示子元素是水平布局，但是从右往左*/
            flex-direction: column;/*表示子元素是垂直布局，但是从下往上*/
            /*flex-wrap: wrap;表示子元素会自动换行*/
            /*如果父元素空间不够，会自动压缩*/
        }
        .zi{
            width: 100px;
            height: 100px;
            background-color: #eb6262;
            border: 3px solid red;
        }
    </style>
</head>
<body>
<div class="fu">
    <div class="zi">1</div>
    <div class="zi">2</div>
    <div class="zi">3</div>
    <div class="zi">4</div>
    <div class="zi">5</div>
    <div class="zi">6</div>
    <div class="zi">7</div>
</div>
</body>
</html>